Dynomotion

Group: DynoMotion Message: 5382 From: himykabibble Date: 6/30/2012
Subject: Where Is The Machine Right Now?
Tom,

How does one determine where an axis actually is at any point in time? My understanding is the Dest field indicates where it is supposed to be at the end of the current time slice. Is that correct? If I do a Move, in particular a MoveExp(), how can I tell what the current target position of a move in-progress is?

Regards,
Ray L.
Group: DynoMotion Message: 5383 From: Tom Kerekes Date: 6/30/2012
Subject: Re: Where Is The Machine Right Now?
Hi Ray,
 
Did you mean to say at the end of the current Move or Servo Sample (90us)?  The Dest variable is where the axis is supposed to be for the current servo sample.  It is only updated once every Servo Sample.  A User program only executes every several Servo Samples (2 for only one User Thread running).
 
Regards
TK
 

Group: DynoMotion Message: 5384 From: himykabibble Date: 6/30/2012
Subject: Re: Where Is The Machine Right Now?
Tom,

I'd like to be able to tell (approximately) where the machine actually is in a user program. So, for example, if I were to program a MoveExp that would move 20", then a second or two later want to cancel it, I'd like to know where the machine actually is, and program a new move with a destination close to the current position. Does that make sense?

Sounds like I can just treat Dest as the current position, with an error no greater than the distance the axis can move in a few sample periods?

The problem I have is that now that I have a high resolution MPG, it is easy to spin it far enough/fast enough that when I stop spinning it, the axis continues to move for several seconds, and considerable distance. When I use the stop code in your MPGSmooth example, the stop is very abrupt, and sometimes even causes a reversal. I'd like to simply do a final MoveExp with a destination a short distance from the current position, calculated such that the axis should be able to stop smoothly. I don't mind the second or so it takes for the MoveExp to come to the target position.

Regards,
Ray L.



--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Ray,
>  
> Did you mean to say at the end of the current Move or Servo Sample (90us)?  The Dest variable is where the axis is supposed to be for the current servo sample.  It is only updated once every Servo Sample.  A User program only executes every several Servo Samples (2 for only one User Thread running).
>  
> Regards
> TK
>  
>
> From: himykabibble <jagboy@...>
> To: DynoMotion@yahoogroups.com
> Sent: Saturday, June 30, 2012 8:55 PM
> Subject: [DynoMotion] Where Is The Machine Right Now?
>
>
>  
> Tom,
>
> How does one determine where an axis actually is at any point in time? My understanding is the Dest field indicates where it is supposed to be at the end of the current time slice. Is that correct? If I do a Move, in particular a MoveExp(), how can I tell what the current target position of a move in-progress is?
>
> Regards,
> Ray L.
>
Group: DynoMotion Message: 5387 From: himykabibble Date: 7/1/2012
Subject: Re: Where Is The Machine Right Now?
Hello? Is anyone home?

--- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@...> wrote:
>
> Tom,
>
> I'd like to be able to tell (approximately) where the machine actually is in a user program. So, for example, if I were to program a MoveExp that would move 20", then a second or two later want to cancel it, I'd like to know where the machine actually is, and program a new move with a destination close to the current position. Does that make sense?
>
> Sounds like I can just treat Dest as the current position, with an error no greater than the distance the axis can move in a few sample periods?
>
> The problem I have is that now that I have a high resolution MPG, it is easy to spin it far enough/fast enough that when I stop spinning it, the axis continues to move for several seconds, and considerable distance. When I use the stop code in your MPGSmooth example, the stop is very abrupt, and sometimes even causes a reversal. I'd like to simply do a final MoveExp with a destination a short distance from the current position, calculated such that the axis should be able to stop smoothly. I don't mind the second or so it takes for the MoveExp to come to the target position.
>
> Regards,
> Ray L.
>
>
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Ray,
> >  
> > Did you mean to say at the end of the current Move or Servo Sample (90us)?  The Dest variable is where the axis is supposed to be for the current servo sample.  It is only updated once every Servo Sample.  A User program only executes every several Servo Samples (2 for only one User Thread running).
> >  
> > Regards
> > TK
> >  
> >
> > From: himykabibble <jagboy@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Saturday, June 30, 2012 8:55 PM
> > Subject: [DynoMotion] Where Is The Machine Right Now?
> >
> >
> >  
> > Tom,
> >
> > How does one determine where an axis actually is at any point in time? My understanding is the Dest field indicates where it is supposed to be at the end of the current time slice. Is that correct? If I do a Move, in particular a MoveExp(), how can I tell what the current target position of a move in-progress is?
> >
> > Regards,
> > Ray L.
> >
>
Group: DynoMotion Message: 5394 From: Tom Kerekes Date: 7/2/2012
Subject: Re: Where Is The Machine Right Now?
Hi Ray,
 
Yes you can use the chx->Dest variable to tell where the axis is currently commanded to be.
 
I'm thinking a better solution would be to not command the position so far away in the first place.  If you never move the target position faster than what the axis can move then the axis will be able to keep up with the target position (within he Tau lag) and will then stop/converge at the Tau rate as soon as the position stops moving.    Only if the target is moved at an excessive rate will the axis position not be able to keep up, fall way behind, and keep moving and take a long time to catch up after the Target position stops changing.
 
The MPGSmooth.c program assumes this is the case so that after converging for 1 second it should be only a microscopic distance from the target - not still inches away.
 
Regards
TK

Group: DynoMotion Message: 5398 From: himykabibble Date: 7/2/2012
Subject: Re: Where Is The Machine Right Now?
Tom,

Well.... Here's the problem I have. If I set a low increment/click on the MPG (0.001"), then I can't go very fast, no matter how fast I turn the MPG. If I increase the increment/click, then I can go fast, but don't see how to limit it to a move that it will make at full speed, but can stop quickly when I stop turning the MPG. I'm thinking I need to compare where it is to where I last told it to go, and make sure that delta never exceeds the distance from which it can stop in, say, one second. But, will that distance be enough to ensure it reaches full rapid speed?

Regards,
Ray L.

--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Ray,
>  
> Yes you can use the chx->Dest variable to tell where the axis is currently commanded to be.
>  
> I'm thinking a better solution would be to not command the position so far away in the first place.  If you never move the target position faster than what the axis can move then the axis will be able to keep up with the target position (within he Tau lag) and will then stop/converge at the Tau rate as soon as the position stops moving.    Only if the target is moved at an excessive rate will the axis position not be able to keep up, fall way behind, and keep moving and take a long time to catch up after the Target position stops changing.
>  
> The MPGSmooth.c program assumes this is the case so that after converging for 1 second it should be only a microscopic distance from the target - not still inches away.
>  
> Regards
> TK
>
> From: himykabibble <jagboy@...>
> To: DynoMotion@yahoogroups.com
> Sent: Saturday, June 30, 2012 9:19 PM
> Subject: [DynoMotion] Re: Where Is The Machine Right Now?
>
>
>  
> Tom,
>
> I'd like to be able to tell (approximately) where the machine actually is in a user program. So, for example, if I were to program a MoveExp that would move 20", then a second or two later want to cancel it, I'd like to know where the machine actually is, and program a new move with a destination close to the current position. Does that make sense?
>
> Sounds like I can just treat Dest as the current position, with an error no greater than the distance the axis can move in a few sample periods?
>
> The problem I have is that now that I have a high resolution MPG, it is easy to spin it far enough/fast enough that when I stop spinning it, the axis continues to move for several seconds, and considerable distance. When I use the stop code in your MPGSmooth example, the stop is very abrupt, and sometimes even causes a reversal. I'd like to simply do a final MoveExp with a destination a short distance from the current position, calculated such that the axis should be able to stop smoothly. I don't mind the second or so it takes for the MoveExp to come to the target position.
>
> Regards,
> Ray L.
>
> --- In mailto:DynoMotion%40yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Ray,
> >  
> > Did you mean to say at the end of the current Move or Servo Sample (90us)?  The Dest variable is where the axis is supposed to be for the current servo sample.  It is only updated once every Servo Sample.  A User program only executes every several Servo Samples (2 for only one User Thread running).
> >  
> > Regards
> > TK
> >  
> >
> > From: himykabibble <jagboy@>
> > To: mailto:DynoMotion%40yahoogroups.com
> > Sent: Saturday, June 30, 2012 8:55 PM
> > Subject: [DynoMotion] Where Is The Machine Right Now?
> >
> >
> >  
> > Tom,
> >
> > How does one determine where an axis actually is at any point in time? My understanding is the Dest field indicates where it is supposed to be at the end of the current time slice. Is that correct? If I do a Move, in particular a MoveExp(), how can I tell what the current target position of a move in-progress is?
> >
> > Regards,
> > Ray L.
> >
>
Group: DynoMotion Message: 5410 From: Tom Kerekes Date: 7/2/2012
Subject: Re: Where Is The Machine Right Now?
Hi Ray,
 
Yes, I think you need to limit the new Target to within some distance of where you currently are.
 
An exponential curve has the property that speed is proportional to the distance (as it gets closer it goes slower).  After 6 Tau time the speed and distance will be reduced by 99.7%.  So if you want to "Stop" in about 1 second you should probably set Tau to about 1/6th of a second or less.
 
Regards
TK